/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.unmsm.cinfo.siga.datos;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author alumno
 */
@Entity
@Table(name = "FOFLOAT")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Fofloat.findAll", query = "SELECT f FROM Fofloat f"),
    @NamedQuery(name = "Fofloat.findByFotpId", query = "SELECT f FROM Fofloat f WHERE f.fotpId = :fotpId"),
    @NamedQuery(name = "Fofloat.findByFotpPrecio", query = "SELECT f FROM Fofloat f WHERE f.fotpPrecio = :fotpPrecio"),
    @NamedQuery(name = "Fofloat.findByFotpFinicio", query = "SELECT f FROM Fofloat f WHERE f.fotpFinicio = :fotpFinicio"),
    @NamedQuery(name = "Fofloat.findByFotpFfinal", query = "SELECT f FROM Fofloat f WHERE f.fotpFfinal = :fotpFfinal"),
    @NamedQuery(name = "Fofloat.findByFotpEst", query = "SELECT f FROM Fofloat f WHERE f.fotpEst = :fotpEst")})
public class Fofloat implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "FOTP_ID")
    private Integer fotpId;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "FOTP_PRECIO")
    private BigDecimal fotpPrecio;
    @Column(name = "FOTP_FINICIO")
    @Temporal(TemporalType.DATE)
    private Date fotpFinicio;
    @Column(name = "FOTP_FFINAL")
    @Temporal(TemporalType.DATE)
    private Date fotpFfinal;
    @Column(name = "FOTP_EST")
    private Short fotpEst;

    public Fofloat() {
    }

    public Fofloat(Integer fotpId) {
        this.fotpId = fotpId;
    }

    public Integer getFotpId() {
        return fotpId;
    }

    public void setFotpId(Integer fotpId) {
        this.fotpId = fotpId;
    }

    public BigDecimal getFotpPrecio() {
        return fotpPrecio;
    }

    public void setFotpPrecio(BigDecimal fotpPrecio) {
        this.fotpPrecio = fotpPrecio;
    }

    public Date getFotpFinicio() {
        return fotpFinicio;
    }

    public void setFotpFinicio(Date fotpFinicio) {
        this.fotpFinicio = fotpFinicio;
    }

    public Date getFotpFfinal() {
        return fotpFfinal;
    }

    public void setFotpFfinal(Date fotpFfinal) {
        this.fotpFfinal = fotpFfinal;
    }

    public Short getFotpEst() {
        return fotpEst;
    }

    public void setFotpEst(Short fotpEst) {
        this.fotpEst = fotpEst;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (fotpId != null ? fotpId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Fofloat)) {
            return false;
        }
        Fofloat other = (Fofloat) object;
        if ((this.fotpId == null && other.fotpId != null) || (this.fotpId != null && !this.fotpId.equals(other.fotpId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pe.edu.unmsm.cinfo.siga.datos.Fofloat[ fotpId=" + fotpId + " ]";
    }
    
}
